RWTH - Mindstorms NXT Toolbox

ResetMotorAngle

Resets the relative angle counter for the given motor

Contents

Syntax

ResetMotorAngle(port)

ResetMotorAngle(port, handle)

Description

ResetMotorAngle(port) resets the relative angle counter for the motor connected to the given port. The value port can be addressed by the symbolic constants MOTOR_A, MOTOR_B and MOTOR_C analog to the labeling on the NXT Brick. The relative counter can be read by the function GetMotorSettings.

ResetMotorAngle(port, handle) uses the given Bluetooth connection handle. This should be a serial handle on a PC system and a file handle on a Linux system.

If no NXT handle is specified the default one (COM_GetDefaultNXT) is used.

Examples

   ResetMotorAngle(MOTOR_A);
   handle = COM_OpenNXT('bluetooth.ini','check');
   ResetMotorAngle(MOTOR_C, handle);

See also

NXT_ResetMotorPosition, GetMotorSettings, MOTOR_A, MOTOR_B, MOTOR_C, COM_GetDefaultNXT

Signature